class Solution:
    def twoSum(self, nums: list[int], target: int) -> List[int]:
        dict = {}
        i = 0;
        for num in nums:
            dict[num] = i
            i = i + 1
        for i in range(len(nums)):
            value = dict.get(target - nums[i])
            if value is not None and value != i:
                return [i, value]


if __name__ == '__main__':
    s = Solution()

    s.twoSum([2, 7, 11, 15], 9)
